import { ExtractPropTypes } from 'vue';
import { createPropsResolver } from '../../dynamic-resolver';
import extendPanelSchema from './schema/extend-panel.schema.json';
import { schemaMapper } from './schema/schema-mapper';
// {
//     "cover": {
//         "title": "春季",
//         "description": "春季开始，天气逐渐回暖，花草开始绽放.",
//         "ltTip": "Year:2023",
//         "lbTip": "Tip:点击展开"
//     },
//     "data": [
//         {
//             "label": "统计数",
//             "value": 1000,
//             "unit": "件"
//         }
//     ],
//     "contentScroll": {
//         "open": false,
//         "width": "auto"
//     }
// }
export const ExtendPanelProps = {
    /** item 间隙 */
    itemGap: { Type: String, default: '10px' },
    /** 非展开的缩放 */
    itemScale: { Type: Number, default: 0.8 },
    /** item的数组 */
    data: { Type: Array, default: [] },
    /** 容器高度 */
    height: { Type: String, default: '180px' },
} as Record<string, any>;

export type ExtendPanelPropsType = ExtractPropTypes<typeof ExtendPanelProps>;

export const propsResolver = createPropsResolver<ExtendPanelPropsType>(ExtendPanelProps, extendPanelSchema, schemaMapper);
